package com.ruoyi.personnelMatters.service.impl;

import com.ruoyi.personnelMatters.domain.*;
import com.ruoyi.personnelMatters.mapper.PerScheduledTasksMapper;
import com.ruoyi.personnelMatters.service.IPerScheduledTasksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 定时任务扫描实现类
 */
@Service
public class PerScheduledTasksServiceImpl implements IPerScheduledTasksService {
    @Autowired
    private PerScheduledTasksMapper perScheduledTasksMapper;

    /**
     * @return 需要执行的List<DeptChangeScanInfo>信息
     */
    @Override
    public List<DeptChangeScanInfo> getToBeExecutDeptInfo() {
        return perScheduledTasksMapper.getToBeExecutDeptInfo();
    }

    /**
     * @return 需要执行的List<PositionChangeScanInfo>信息
     */
    @Override
    public List<PositionChangeScanInfo> getToBeExecutPositionInfo() {
        return perScheduledTasksMapper.getToBeExecutPositionInfo();
    }

    @Override
    public List<PostChangeScanInfo> getTobeExecutPostInfo() {
        return perScheduledTasksMapper.getTobeExecutPostInfo();
    }

    @Override
    public List<EmployeeStatusScanInfo> getTobeExecutEmployeeStatusInfo() {
        return perScheduledTasksMapper.getTobeExecutEmployeeStatusInfo();
    }

    @Override
    public List<SalaryChangeScanInfo> getTobeExecuteSalaryChangeScanInfo() {
        return perScheduledTasksMapper.getTobeExecuteSalaryChangeScanInfo();
    }

    /**
     * 标记已执行
     */
    @Override
    public int markExecuted(int personDeptChangeId) {
        return perScheduledTasksMapper.markExecuted(personDeptChangeId);
    }

    @Override
    public int markPositionExecuted(int personPositionChangeId){
        return perScheduledTasksMapper.markPositionExecuted(personPositionChangeId);
    }

    @Override
    public int markPostExecuted(int personPostChangeId) {
        return perScheduledTasksMapper.markPostExecuted(personPostChangeId);
    }

    @Override
    public int markSalaryScaleExecuted(int personEmpStatusChangeId) {
        return perScheduledTasksMapper.markSalaryScaleExecuted(personEmpStatusChangeId);
    }

    @Override
    public int markEmployeeStatusExecuted(int personEmpStatusChangeId) {
        return perScheduledTasksMapper.markEmployeeStatusExecuted(personEmpStatusChangeId);
    }
}
